home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / aros / devs / ram_handler_gcc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-12  |  1.7 KB  |  58 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: ram_handler_gcc.h,v 1.1 1996/09/11 12:52:54 digulla Exp $
  4.     $Log: ram_handler_gcc.h,v $
  5.     Revision 1.1  1996/09/11 12:52:54  digulla
  6.     Two new devices by M. Fleischer: RAM: and NIL:
  7.  
  8.  
  9.     Desc:
  10.     Lang:
  11. */
  12. #ifndef RAM_HANDLER_GCC_H
  13. #define RAM_HANDLER_GCC_H
  14. #include <aros/libcall.h>
  15. #include <exec/execbase.h>
  16. #include <exec/io.h>
  17. #include <exec/devices.h>
  18. #include <dos/dos.h>
  19. #include <dos/filesystem.h>
  20.  
  21. struct rambase
  22. {
  23.     struct Device device;
  24.     struct ExecBase *sysbase;
  25.     struct DosLibrary *dosbase;
  26.     struct UtilityBase *utilitybase;
  27.     BPTR seglist;
  28.     ULONG unitcount;
  29.     struct MsgPort *port;        /* Port to put IORequests to */
  30.     struct SignalSemaphore *sigsem;    /* Semaphore for iofs */
  31.     struct IOFileSys *iofs;        /* IORequest to be aborted or NULL */
  32.     struct MinList waitdoslist;
  33. };
  34.  
  35. #define init(rambase, segList) \
  36. __AROS_LC2(struct rambase *, init, __AROS_LA(struct rambase *, rambase, D0), __AROS_LA(BPTR, segList, A0), struct ExecBase *, SysBase, 0, ram)
  37.  
  38. #define open(iob, unitnum, flags) \
  39. __AROS_LC3(void, open, __AROS_LA(struct ramrequest *, iob, A1), __AROS_LA(ULONG, unitnum, D0), __AROS_LA(ULONG, flags, D0), struct rambase *, rambase, 1, ram)
  40.  
  41. #define close(iob) \
  42. __AROS_LC1(BPTR, close, __AROS_LA(struct ramrequest *, iob, A1), struct rambase *, rambase, 2, ram)
  43.  
  44. #define expunge() \
  45. __AROS_LC0(BPTR, expunge, struct rambase *, rambase, 3, ram)
  46.  
  47. #define null() \
  48. __AROS_LC0(int, null, struct rambase *, rambase, 4, ram)
  49.  
  50. #define beginio(iob) \
  51. __AROS_LC1(void, beginio, __AROS_LA(struct ramrequest *, iob, A1), struct rambase *, rambase, 5, ram)
  52.  
  53. #define abortio(iob) \
  54. __AROS_LC1(LONG, abortio, __AROS_LA(struct ramrequest *, iob, A1), struct rambase *, rambase, 6, ram)
  55.  
  56. #endif
  57.  
  58.